import GlobalLayoutVue from "@/components/layout/GlobalLayout.vue";
import RouterView from "@/components/layout/RouterView.vue";

export default [
  {
    path: "/",
    component: GlobalLayoutVue,
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "首页",
        component: () => import("@/views/home/HomeIndex.vue"),
      },
    ],
  },
  {
    path: "/user",
    name: "用户",
    component: () => import("@/App.vue"),
    children: [
      {
        path: "/user/login",
        name: "登录",
        component: () => import("@/views/login/UserLogin.vue"),
      },
    ],
  },
  {
    path: "/dev",
    name: "设备模块",
    component: GlobalLayoutVue,
    redirect: "/dev/list",
    children: [
      {
        path: "/dev/list",
        name: "设备列表",
        component: () => import("@/views/dev/DevList.vue"),
      },
      {
        path: "/dev/export",
        name: "设备导出",
        component: () => import("@/views/dev/DevExport.vue"),
      },
    ],
  },
  {
    path: "/map",
    name: "地图",
    component: GlobalLayoutVue,
    redirect: "/map/MapGaoDe",
    children: [
      {
        path: "/map/MapGaoDe",
        name: "高德地图",
        component: () => import("@/views/map/MapGaoDe.vue"),
      },
      {
        path: "/map/MapBaiDu",
        name: "百度地图",
        component: () => import("@/views/map/MapBaiDu.vue"),
      },
      {
        path: "/map/MapBaiDu2",
        name: "百度地图2",
        component: () => import("@/views/map/MapBaiDu2.vue"),
      },
      {
        path: "/map/MapEcharts",
        name: "Echarts地图",
        component: () => import("@/views/map/MapEcharts.vue"),
      },
    ],
  },
  {
    name: "数据大屏",
    path: "/bigScreen",
    component: RouterView,
    children: [
      {
        name: "数据大屏首页",
        path: "/bigScreen/index",
        component: () => import("@/views/big_screen/BigScreen.vue"),
      },
    ],
  },
  {
    name: "遥测",
    path: "/remote",
    component: GlobalLayoutVue,
    redirect: "/remote/console",
    children: [
      {
        path: "/remote/console",
        name: "Console日志",
        component: () => import("@/views/remote/RemoteConsole.vue"),
      },
    ],
  },
  {
    name: "Echart",
    path: "/echart",
    component: GlobalLayoutVue,
    redirect: "/echart/Echart001",
    children: [
      {
        name: "通用配置",
        path: "/echart/Echart002",
        component: () => import("@/views/echart/Echart002.vue"),
      },
      {
        name: "直角坐标系",
        component: RouterView,
        path: "005",
        redirect: "/echart/Echart005",
        children: [
          {
            name: "通用",
            path: "/echart/Echart005",
            component: () => import("@/views/echart/Echart005.vue"),
          },
          {
            name: "柱状图",
            path: "/echart/Echart001",
            component: () => import("@/views/echart/Echart001.vue"),
          },
          {
            name: "折线图",
            path: "/echart/Echart003",
            component: () => import("@/views/echart/Echart003.vue"),
          },
          {
            name: "散点图",
            path: "/echart/Echart004",
            component: () => import("@/views/echart/Echart004.vue"),
          },
        ],
      },
      {
        name: "饼图",
        path: "/echart/Echart006",
        component: () => import("@/views/echart/Echart006.vue"),
      },
      {
        name: "地图echart",
        component: RouterView,
        path: "007",
        redirect: "/echart/Echart007",
        children: [
          {
            name: "空气质量",
            path: "/echart/Echart007",
            component: () => import("@/views/echart/Echart007.vue"),
          },
          {
            name: "散点图-地图",
            path: "/echart/Echart008",
            component: () => import("@/views/echart/Echart008.vue"),
          },
        ],
      },
      {
        name: "雷达图",
        path: "/echart/Echart009",
        component: () => import("@/views/echart/Echart009.vue"),
      },
      {
        name: "仪表盘",
        path: "/echart/Echart010",
        component: () => import("@/views/echart/Echart010.vue"),
      },
    ],
  },
  {
    name: "Echart应用",
    path: "/echart_application",
    component: GlobalLayoutVue,
    redirect: "/echart_application/big_screen",
    children: [
      {
        name: "销售报表",
        path: "/echart_application/Seller",
        component: () => import("@/views/echart_application/Seller.vue"),
      },
      {
        name: "趋势报表",
        path: "/echart_application/Trend",
        component: () => import("@/views/echart_application/Trend.vue"),
      },
      {
        name: "地图应用",
        path: "/echart_application/Map",
        component: () => import("@/views/echart_application/Map.vue"),
      },
      {
        name: "销售",
        path: "/echart_application/Rank",
        component: () => import("@/views/echart_application/Rank.vue"),
      },
      {
        name: "热销",
        path: "/echart_application/Hot",
        component: () => import("@/views/echart_application/Hot.vue"),
      },
      {
        name: "库存",
        path: "/echart_application/Stock",
        component: () => import("@/views/echart_application/Stock.vue"),
      },
    ],
  },
  {
    name: "大屏展示2",
    path: "/echart_application/BigScreen",
    component: RouterView,
    children: [
      {
        name: "大屏展示2详情",
        path: "/echart_application/BigScreen/index",
        component: () => import("@/views/echart_application/BigScreen.vue"),
      },
    ],
  },
  {
    path: "/404",
    name: "404页面",
    component: () => import("@/views/404/Error404.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "其他的不存在的路由",
  },
];
